package online.shenme.day05;

public class RecurenceTest {
    public static void main(String[] args) {
        int result = getnum(10, 18);
        System.out.println(result);
        result = 10;
        for (int i = 0; i < 17; i++) {
            result += 2;
        }
        System.out.println(result);
        result=1;int num1=1;int num2=2;
        for (int i = 0; i < 7; i++) {

            result=num1+num2;
        }

        System.out.println();
        result =getnum1(1,8);
        System.out.println(result);
    }

    private static int getnum1(int i, int j) {
        if (j<=2){
            return 1;
        }else {
            return getnum1(i,j-1)+getnum1(i, j-2);
        }
    }

    public static int getnum(int start, int size) {
        if (size == 1) {
            return start;
        } else {
            return getnum(start, size - 1) + 2;
        }
    }
}
